package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;

import com.blankj.utilcode.util.ToastUtils;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityInputTextBinding;
import stark.common.basic.event.EventStatProxy;

public class InputTextActivity extends BaseAc<ActivityInputTextBinding> {


    @Override
    protected int onCreate() {
        return R.layout.activity_input_text;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(this, mDataBinding.event1Container);

        mDataBinding.ivInputTextBack.setOnClickListener(v -> onBackPressed());
        mDataBinding.ivStart.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.ivStart://生成pdf
                String content = mDataBinding.etInput.getText().toString();
                if (TextUtils.isEmpty(content)) {
                    ToastUtils.showShort(getString(R.string.please_input_text));
                    return;
                }
                ConvTextActivity.content = content;
                startActivity(ConvTextActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}